﻿#region Using

using System;
using System.Reflection;
using System.Windows.Forms;

#endregion

namespace onyxLauncher
{
    internal static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        private static void Main()
        {
            var currentDomain = AppDomain.CurrentDomain;
            currentDomain.AssemblyResolve += CurrentDomainAssemblyResolve;
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new SplashWindow());
        }

        private static Assembly CurrentDomainAssemblyResolve(object sender, ResolveEventArgs args)
        {
            var engineDll = Assembly.LoadFile(Application.StartupPath + "\\bin\\onyx.dll");
            return engineDll;
        }
    }
}